package com.wdc.queue;

public class Arr<E> {
    private int size;
    private int capacity;

    E[] arr;
    public boolean add(E value) {
        if (isFull()) {
            return false;
        }

        arr[size++] = value;
        return true;
    }


    public boolean isFull() {
        return  size >= capacity;
    }

    public Arr(int capacity) {
        arr = (E[]) new Arr[capacity];
    }

    public static void main(String[] args) {
        Arr<Integer> integerArr = new Arr<>(5);
        integerArr.add(1);
        integerArr.add(2);
        integerArr.add(3);


    }
}
